﻿@model IEnumerable<UserStoryTrackerDemo.Models.UserStoryVM>

@{
    ViewBag.Title = "User Stories";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Message</h2>

<p>
    @Html.ActionLink("Create New User Story", "Create")
</p>
<table>
    <tr>
        <th>As a</th>
        <th>I can</th>
        <th>so that/because</th>
        <th>Completed</th>
        <th>Actions</th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>       
             @item.AsA           
        </td>
        <td>
            @item.ICan
        </td>
        <td>@item.SoThatBecause</td>
        <td>@item.Completed.ToString()</td>
        <td>@Html.ActionLink("View User Story", "Details", new { id = item.Id }) </td> 
    </tr>
}

</table>
